from header_particle_systems import *


####################################################################################################################
#   Each particle system contains the following fields:
#  
#  1) Particle system id (string): used for referencing particle systems in other files.
#     The prefix psys_ is automatically added before each particle system id.
#  2) Particle system flags (int). See header_particle_systems.py for a list of available flags
#  3) mesh-name.
####
#  4) Num particles:    Maximum number of particles at any given time.
#  5) Particle Life:    Each particle lives this long (in seconds).
#  6) Damping:          How much particle's speed is lost due to friction.
#  7) Gravity strength: Effect of gravity. (Negative values make the particles float upwards.)
#  8) Turbulance size:  Size of random turbulance (in meters)
#  9) Turbulance strength: How much a particle is affected by turbulance.
####
# 10,11) Alpha keys :    Each attribute is controlled by two keys and 
# 12,13) Red keys   :    each key has two fields: (time, magnitude)
# 14,15) Green keys :    For example scale key (0.3,0.6) means 
# 16,17) Blue keys  :    scale of each particle will be 0.6 at the
# 18,19) Scale keys :    time 0.3 (where time=0 means creation and time=1 means end of the particle)
#
# The magnitudes are interpolated in between the two keys and remain constant beyond the keys.
# Except the alpha always starts from 0 at time 0.
####
# 20) Emit Box Size :   The dimension of the box particles are emitted from.
# 21) Emit velocity :   Particles are initially shot with this velocity.
# 22) Emit dir randomness
####################################################################################################################

particle_systems = [
    ("torch_fire", psf_billboard_3d|psf_global_emit_dir, "prtcl_fire",
     100, 0.3, 0.2, -0.3, 10.0, 0.1,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.5, 0.4), (1, 0), #alpha keys
     (0.5, 1.0), (1, 0.9), #red keys
     (0.5, 0.85),(1, 0.3), #green keys
     (0.5, 0.6), (1, 0.0), #blue keys
     (0, 0.4),   (0.4, 1.2), #scale keys
     (0.07, 0.07, 0.05),  #emit box size
     (0, 0, 0.8),           #emit velocity
     0.3                #emit dir randomness
    ),
    
    ("torch_smoke", psf_billboard_3d|psf_global_emit_dir, "prtcl_dust_a",
     70, 1.5, 0.2, -0.2, 10.0, 0.1,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.5, 0.25), (1, 0), #alpha keys
     (0.0, 0.2), (1, 0.1), #red keys
     (0.0, 0.2),(1, 0.09), #green keys
     (0.0, 0.2), (1, 0.08), #blue keys
     (0, 0.5),   (0.8, 2.5), #scale keys
     (0.1, 0.1, 0.1),  #emit box size
     (0, 0, 1.5),           #emit velocity
     0.1                #emit dir randomness
    ),

    ("pistol_smoke", psf_billboard_3d, "prtcl_dust_a",
     90, 2.5, 0.6, -0.2, 60.0, 1.5,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.0, 0.75), (1, 0), #alpha keys
     (0.0, 0.7), (1, 0.4), #red keys
     (0.0, 0.7),(1, 0.4), #green keys
     (0.0, 0.7), (1, 0.4), #blue keys
     (0, 1.5),   (0.5, 11.0), #scale keys
     (0.1, 0.1, 0.1),  #emit box size
     (2, 2, 0),           #emit velocity
     0.1                #emit dir randomness
    ),
    
    ("cooking_fire", psf_billboard_3d|psf_global_emit_dir, "prtcl_fire",
     50, 0.5, 0.2, -0.05, 30.0, 0.3,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.5, 0.4), (1, 0), #alpha keys
     (0.5, 1.0), (1, 0.9), #red keys
     (0.5, 0.4), (1, 0.1), #green keys
     (0.5, 0.2), (1, 0.0), #blue keys
     (0.3, 0.9),   (0.9, 0.6), #scale keys
     (0.07, 0.07, 0.01),  #emit box size
     (0, 0, 0.1),           #emit velocity
     0.1                #emit dir randomness
    ),
    
    ("cooking_smoke", psf_billboard_3d|psf_global_emit_dir, "prtcl_dust_a",
     35, 3.5, 0.4, -0.03, 10.0, 10.9,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.4, 0.2), (1, 0), #alpha keys
     (0.0, 0.6), (1, 0.3), #red eys
     (0.0, 0.6),(1, 0.3),  #green keys
     (0.0, 0.6), (1, 0.3), #blue keys
     (0, 2.5),   (0.9, 7.5), #scale keys
     (0.1, 0.1, 0.06),  #emit box size
     (0, 0, 1.3),           #emit velocity
     0.2                #emit dir randomness
    ),

    ("food_steam", psf_billboard_3d|psf_global_emit_dir, "prtcl_dust_a",
     30, 0.8, 0.4, -0.02, 8.0, 0.9,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.4, 0.15), (1, 0), #alpha keys
     (0.0, 0.9), (1, 0.8), #red eys
     (0.0, 0.9),(1, 0.8),  #green keys
     (0.0, 0.9), (1, 0.8), #blue keys
     (0, 0.3),   (0.9, 0.5), #scale keys
     (0.05, 0.05, 0.02),  #emit box size
     (0, 0, 0.08),           #emit velocity
     0.05                #emit dir randomness
    ),

    ("candle_light", psf_billboard_3d|psf_global_emit_dir, "prtcl_fire",
     39, 1.1, 0.6, -0.0, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.1, 0.5), (1, 0), #alpha keys
     (0.5, 1.0), (1, 0.9), #red keys
     (0.5, 0.6), (1, 0.1), #green keys
     (0.5, 0.2), (1, 0.0), #blue keys
     (0.3, 0.4),   (0.9, 0.2), #scale keys
     (0.005, 0.005, 0.005),  #emit box size
     (0, 0, 0.09),           #emit velocity
     0.01                #emit dir randomness
    ),
    ("candle_light_small", psf_billboard_3d|psf_global_emit_dir, "prtcl_fire",
     35, 1.1, 0.6, -0.0, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.1, 0.5), (1, 0), #alpha keys
     (0.5, 1.0), (1, 0.9), #red keys
     (0.5, 0.6), (1, 0.1), #green keys
     (0.5, 0.2), (1, 0.0), #blue keys
     (0.3, 0.3),   (0.9, 0.1), #scale keys
     (0.005, 0.005, 0.005),  #emit box size
     (0, 0, 0.05),           #emit velocity
     0.01                #emit dir randomness
    ),
    ("lamp_fire", psf_billboard_3d|psf_global_emit_dir, "prtcl_fire",
     45, 1.1, 0.6, -0.0, 10.0, 0.4,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.1, 0.5), (1, 0), #alpha keys
     (0.5, 1.0), (1, 0.9), #red keys
     (0.5, 0.6), (1, 0.1), #green keys
     (0.5, 0.2), (1, 0.0), #blue keys
     (0.3, 0.9),   (0.9, 0.5), #scale keys
     (0.01, 0.01, 0.005),  #emit box size
     (0, 0, 0.29),           #emit velocity
     0.03                #emit dir randomness
    ),
]
